package com.ocom.common.request.exposeapi;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Description: TODO
 * @Author: 朱晖
 * @Date: 2023/3/23
 **/
@Data
public class AccountRechargeRequest {

	/**
	 * pCode	人员编号	string		是
	 * money	充值金额	Int	单位：分	是
	 * orderNo	充值单号	String	长32唯一订单号	是
	 * type	类型	int	1现金 2补贴 3奖金	是
	 */

	@JsonProperty("pCode")
	@NotBlank(message = "pCode 不能为空")
	String pCode;
	@Min(value = 1,message = "money最小1")
	Long money;
	@Length(min = 30,max = 38,message = "orderNo长度应该在30-38")
	@NotBlank(message = "orderNo 不能为空")
	String orderNo;
	@NotNull(message = "type 不能为空")
	@Min(value = 1,message = "type最小1")
	@Max(value = 3,message = "type最大3")
	Integer type;


	@NotNull(message = "timestamp 毫秒时间长不能为空")
	Long timestamp;

	@NotBlank(message = "comId 不能为空")
	String comId;   //实际是 comAppId
	@NotBlank(message = "nonceStr 不能为空")
	@Length(min = 32, max = 32, message = "nonceStr长度必须为32")
	String nonceStr;  // 32
	@Length(min = 32, max = 32, message = "sign长度必须为32")
	@NotBlank(message = "sign 不能为空")
	String sign;   //实际是 comAppId


}
